package cn.virens.app.main;

import java.io.Serializable;

import cn.hutool.core.util.StrUtil;

public class AppInfo implements Serializable {
	private static final long serialVersionUID = -4903947448871371133L;

	private String name;
	private String auth;
	private String[] type;

	public String name() {
		return name;
	}

	protected void setName(String name) {
		this.name = name;
	}

	public String auth() {
		return auth;
	}

	protected void setAuth(String auth) {
		this.auth = auth;
	}

	public String[] type() {
		return type;
	}

	public String type(int index) {
		if (index < 0 || index >= type.length) {
			return null;
		} else {
			return type[index];
		}
	}

	protected void setType(String type) {
		this.setType(StrUtil.splitToArray(type, ','));
	}

	protected void setType(String[] type) {
		this.type = type;
	}

}
